package com.tianxinweb.entity;

import com.baomidou.mybatisplus.enums.IdType;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author cboy
 * @since 2018-08-07
 */
@TableName("tx_user")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "uid", type = IdType.AUTO)
    private Integer uid;
    /**
     * 用户昵称
     */
    @NotNull
    @Length(min = 1,max = 20)
    private String nickname;
    /**
     * 用户手机号码
     */
    @NotNull
    @Pattern(regexp = "^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\\d{8}$")
    private String telphone;
    /**
     * 用户登录密码
     */
    @Length(min = 32,max = 32)
    private String loginPwd;
    /**
     * 用户登录密码盐值
     */
    private String loginSalt;
    /**
     * 支付密码
     */
    @Length(min = 32,max = 32)
    private String payPwd;
    /**
     * 支付密码盐值
     */
    private String paySalt;
    /**
     * 用户邀请码
     */
    private String inviteCode;
    /**
     * 用户父级，默认为0表示没有父级
     */
    private Integer fatherId;
    /**
     * 用户注册时间
     */
    private Date registerTime;
    /**
     * 用户账户余额
     */
    private BigDecimal account;
    /**
     * 黑金币数量
     */
    private Integer blackCoin;
    /**
     * 用户状态，默认为0表示正常，1表示已删除
     */
    private Boolean ustatus;
    /**
     * 用户头像
     */
    private String imgurl;
    /**
     * 下级数量
     */
    private Integer lowerNumb;
    /**
     * 唯一码，其作用是用户查询上下级用户时避免用uid，防止通过uid获取到整个平台的邀请关系
     */
    private String uniqueCode;

    @NotNull
    @Length(min = 18,max = 18)
    private String idcard;
    /**
     * 种子币
     */
    private Integer seedCoin;
    /**
     * 注册金
     */
    private BigDecimal registerMoney;
    /**
     * 购币金
     */
    private BigDecimal purchaseMoney;

    private transient List<BankCard> bankCardList;

    private transient List<User> userList;

    /**
     * 验证码
     */
    private transient String checkcode;

    private transient String confirmPwd;

    public Integer getSeedCoin() {
        return seedCoin;
    }

    public void setSeedCoin(Integer seedCoin) {
        this.seedCoin = seedCoin;
    }

    public BigDecimal getRegisterMoney() {
        return registerMoney;
    }

    public void setRegisterMoney(BigDecimal registerMoney) {
        this.registerMoney = registerMoney;
    }

    public BigDecimal getPurchaseMoney() {
        return purchaseMoney;
    }

    public void setPurchaseMoney(BigDecimal purchaseMoney) {
        this.purchaseMoney = purchaseMoney;
    }

    public List<User> getUserList() {
        return userList;
    }

    public void setUserList(List<User> userList) {
        this.userList = userList;
    }

    public List<BankCard> getBankCardList() {
        return bankCardList;
    }

    public void setBankCardList(List<BankCard> bankCardList) {
        this.bankCardList = bankCardList;
    }


    public String getUniqueCode() {
        return uniqueCode;
    }

    public void setUniqueCode(String uniqueCode) {
        this.uniqueCode = uniqueCode;
    }

    public Integer getLowerNumb() {
        return lowerNumb;
    }

    public void setLowerNumb(Integer lowerNumb) {
        this.lowerNumb = lowerNumb;
    }

    public String getConfirmPwd() {
        return confirmPwd;
    }

    public void setConfirmPwd(String confirmPwd) {
        this.confirmPwd = confirmPwd;
    }

    public String getCheckcode() {
        return checkcode;
    }

    public void setCheckcode(String checkcode) {
        this.checkcode = checkcode;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getTelphone() {
        return telphone;
    }

    public void setTelphone(String telphone) {
        this.telphone = telphone;
    }

    public String getLoginPwd() {
        return loginPwd;
    }

    public void setLoginPwd(String loginPwd) {
        this.loginPwd = loginPwd;
    }

    public String getLoginSalt() {
        return loginSalt;
    }

    public void setLoginSalt(String loginSalt) {
        this.loginSalt = loginSalt;
    }

    public String getPayPwd() {
        return payPwd;
    }

    public void setPayPwd(String payPwd) {
        this.payPwd = payPwd;
    }

    public String getPaySalt() {
        return paySalt;
    }

    public void setPaySalt(String paySalt) {
        this.paySalt = paySalt;
    }

    public String getInviteCode() {
        return inviteCode;
    }

    public void setInviteCode(String inviteCode) {
        this.inviteCode = inviteCode;
    }

    public Integer getFatherId() {
        return fatherId;
    }

    public void setFatherId(Integer fatherId) {
        this.fatherId = fatherId;
    }

    public Date getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(Date registerTime) {
        this.registerTime = registerTime;
    }

    public BigDecimal getAccount() {
        return account;
    }

    public void setAccount(BigDecimal account) {
        this.account = account;
    }

    public Integer getBlackCoin() {
        return blackCoin;
    }

    public void setBlackCoin(Integer blackCoin) {
        this.blackCoin = blackCoin;
    }

    public Boolean getUstatus() {
        return ustatus;
    }

    public void setUstatus(Boolean ustatus) {
        this.ustatus = ustatus;
    }

    public String getImgurl() {
        return imgurl;
    }

    public void setImgurl(String imgurl) {
        this.imgurl = imgurl;
    }

    public String getIdcard() {
        return idcard;
    }

    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }

    @Override
    public String toString() {
        return "User{" +
        ", uid=" + uid +
        ", nickname=" + nickname +
        ", telphone=" + telphone +
        ", loginPwd=" + loginPwd +
        ", loginSalt=" + loginSalt +
        ", payPwd=" + payPwd +
        ", paySalt=" + paySalt +
        ", inviteCode=" + inviteCode +
        ", fatherId=" + fatherId +
        ", registerTime=" + registerTime +
        ", account=" + account +
        ", blackCoin=" + blackCoin +
        ", ustatus=" + ustatus +
        ", imgurl=" + imgurl +
        "}";
    }
}
